home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software of the Month Club 2000 October
/
Software of the Month - Ultimate Collection Shareware 277.iso
/
pc
/
PROGRAMS
/
UTILITY
/
WINLINUX
/
DATA1.CAB
/
etc_-_Configuration_Files
/
POWERD_C.{1E
< prev
next >
Wrap
Text File
|
1999-09-17
|
4KB
|
116 lines
#
# /etc/powerd.conf for powerd version-2.0 and later.
#
# by Alessandro Rubini
#
# Comment out the following line to actually enable powerd.
# Otherwise, it will do everything but shutting down (and up) the system.
# Having it disabled is useful to check network connectivity.
disabled
############# GENERAL FACILITIES
#
# The "delay" fiels allows delayed operation. Thus, if the power has a
# short glitch, you can even avoid scheduling a shutdown, though it
# will be registered in /var/adm/messages. Note that delaying is not
# wise if you get information through the net, because glitches has already
# been removed. Delay is 10 seconds by default.
#delay 20
# "debug" avoids forking and prints verbose info on stderr. Otherwise,
# a daemon is forked and fewer messages go to syslog.
debug yes
# "logfile" is used to redirect stderr. Thus you don't have to edit all
# of your rc files to enable debugging on live tests.
# Note that if "logfile" is specified, powerd goes to the background
# independently of "debug". If by chance you have something not going
# to background in your rc files, the next boot will hand without hope.
#logfile /tmp/powerd.log
############# GETTING/PROVIDING INFO THROUGH THE NET
#
# "remoteserver" is reached to get OK/FAIL.
# If "serverport" is set but "remoteserver" is not,
# then *we* are the server
#remoteserver godipmec.unipv.it
# serverport 2043
# Connecting to the server may take some time: you can specify a number
# of trials, and the timeout for each retransmission. You should allow
# enough time for the server to boot. For Linux is can be as low as a
# few seconds ;-)
# timeout 10
# trials 18
# Since udp is connectionless, you should specify a pollingstep. Thus you
# can re-register to the new remote daemon after server occasional reboots.
# pollingstep 180
############# GETTING INFO FROM A SERIAL LINE
#
# If a simple ups asserts a serial line, use the following lines:
# "monitor" DCD or DSR or CTS (pins 8,6,5 on 25-pin and 1,6,8 on 9-pin).
# "failwhen" can be high or low.
# The default is what powerd-1.1 had hardcoded (DCD high means ok).
# ====> Defaults not working, specify them
#serialline /dev/cua3
# monitor DCD
# failwhen low
# If your UPS can be shut down, you can do it here. You can pulse a
# signal to the ups. Each "assert" force a 1-second sleep.
# In this example we pulse RTS. A shutdown pulse is only effective when
# the UPS is battery powered.
# You can assert RTS or DTR (pins 4,20 on 25-pin and 7,4 on 9-pin).
# assertlow RTS
# asserthigh RTS
# Monitoring a serial line, requires polling, because select() can't
# tell about bit change. Thus a polling interval is required.
# The default is 20. though powerd-1.1. used 2.
# pollingstep 20
# Explicit asserion of a bit may be needed to give power to your cable
# asserthigh DTR
############# GETTING INFO FROM A FIFO
#
# Reading a fifo is nice to debug your actual setup. You can
# "echo FAIL > /var/run/upsctl" and then "echo OK". Alternatively,
# if some other program is providing status info on a file, you can
# fake it to write a fifo. But be careful, check file permissions.
# Remember, also, that when the system is down in single-user mode,
# filesystems other than root are unmounted, and root is read-only.
#readfifo /var/run/upsctl
# failwhen FAIL
# okwhen OK
############# GETTING INFO FROM AN EXTERNAL MONITOR
#
# If your ups uses a rela RS-232 connection, you can have your
# communication prgram which reports OK/FAIL on stdout. If different
# strings are used just specify them. Support for regexp is missing.
#spawnmonitor "/sbin/upsmonitor /dev/ttyS1"
# failwhen FAIL
# okwhen OK